#!/bin/bash
function usage() {
   echo ""
   echo " ${0##*/} - installs ${0#*install-}"
   echo ""
   echo "    Type '${0##*/} --help' for more help."
   echo ""
}
if [ $# -eq 0 ]; then
  usage
  exit 1
fi
match=$(grep -a -n '^DATA:$' ${0} | cut -d ':' -f 1)
start=$((match+1))
tail -n +${start} ${0} | uudecode | tar -xf -
jar=$(ls -rtl *.jar)
java -jar ${jar} $*
exit 0
DATA:
